package com.atguigu.gmall.order.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.order.OrderInfo;
import com.atguigu.gmall.order.client.impl.OrderFeignClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

@FeignClient(value = "service-order",fallback = OrderFeignClientImpl.class)
public interface OrderFeignClient {

    //确认订单信息列表
    @GetMapping("api/order/auth/trade")
    public Result<Map<String,Object>> trade();

    //根据订单id 获取订单信息")
    @GetMapping("api/order/inner/getOrderInfo/{orderId}")
    public OrderInfo getOrderInfo(@PathVariable("orderId") Long orderId);
}
